home *** CD-ROM | disk | FTP | other *** search
/ Aminet 41 / Aminet 41 (2001)(Schatztruhe)[!][Feb 2001].iso / Aminet / comm / net / tf02.lha / TinyFugue / tf-lib / changes.tf < prev    next >
Text File  |  1995-08-12  |  1KB  |  27 lines

  1. ;;; /changes
  2. ;; Using sed would be very fast, but not portable.  Simple-minded comparisons
  3. ;; or triggers would be too slow.  This version is complex, but not too slow.
  4.  
  5. /def -i changes = \
  6.     /let ver=$(/ver)%; \
  7.     /def ~changes_out = \
  8. ;       ; look for the version number marking top of section
  9.         /def -1 -p$[maxpri] -mglob -t": %{*-%ver} *" ~changes_out_ver =\
  10.             /echo - %%%{-L}%%%; \
  11.             /undef ~changes_out_other%%%; \
  12.             /~changes_in%%; \
  13. ;       ; don't test pre-existing triggers
  14.         /def -p$[maxpri-1] -mglob -t"*" ~changes_out_other%; \
  15.     /def ~changes_in = \
  16. ;       ; look for blank line marking end of section
  17.         /def -1 -p$[maxpri] -msimple -t":  :" ~changes_in_blank = \
  18.             /echo - %%%{-L}%%%; \
  19.             /undef ~changes_in_other%%%; \
  20.             /~changes_out%%; \
  21. ;       ; echo all lines in section
  22.         /def -p$[maxpri-1] -mglob -t"*" ~changes_in_other = \
  23.             /echo - %%%{-L}%; \
  24.     /~changes_out%; \
  25.     /quote -S /trigger : '"%TFLIBDIR/CHANGES" :%; \
  26.     /purge ~changes*
  27.